<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
<title>系统首页</title>
<link rel="stylesheet" type="text/css" href="${ctx}/easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="${ctx}/easyui/easyui_my.css">
<link rel="stylesheet" type="text/css" href="${ctx}/easyui/themes/icon.css">
<link rel="stylesheet" type="text/css" href="${ctx}/css/css.css"   />
<script type="text/javascript" src="${ctx }/js/jquery-1.7.min.js"></script>
<script type="text/javascript" src="${ctx}/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="${ctx}/js/AddTabs.js"></script>
<!--[if lte IE 6]>
	<script src="${ctx}/js/DD_belatedPNG_0.0.8a.js" type="text/javascript"></script>
	<script type="text/javascript">
	DD_belatedPNG.fix('.tupiansh1,tupiansh2,tupiansh3,tupiansh4,tupiansh5,tupiansh6,tupiansh7,tupiansh8,tupiansh9,.jjxinxi,ul, img, li, input , a, .png_bg');
	/* 将 .png_bg 改成你应用了透明PNG的CSS选择器*/
	</script>
<![endif]--> 
<style type="text/css">
	.layout-panel{
		overflow: visible;
	}
	.panel{
		overflow: visible;
	}
	.panel-body{
		overflow: visible;
	}
</style>
<script type="text/javascript"> 
//注销退出系统
function zhuXiao(){	
	if(confirm('确定退出系统吗?')){
		$.ajax({
			type:'post',
			url:'${ctx}/login/removeSession.htm',
			success:function(data){
				if(data == 'OK'){
					window.location = "${ctx }/login/login.htm";
				}
			}
		});
	}	
}
$(function(){
	//setInterval('myDate()',1000);
	
	//初始化Ajax表单提交
	$("#saveOrUpdateDevForm").form({
		url:'${ctx }/user/udpatePasswd.htm',
		onSubmit:function(){//提交前校验
			return true;
		},
		success:function(data){//ajax提交后获取数据库返回信息
			if(data == 'true'){
				cancelUpdateDev();
				$.messager.show({
					title:'操作成功',
					msg:'已成功修改用户登录密码',
					timeout:5000,
					showType:'slide'
				});
			}else{
				$.messager.show({
					title:'操作失败',
					msg:'操作失败，请联系管理人员',
					timeout:5000,
					showType:'slide'
				});
			}
		}
	});
});

function myDate(){
	var date = new Date();
    var str1 = "-";
    var str2 = ":";
    var month = date.getMonth() + 1;
    var strDate = date.getDate();
    if (month <= 9) {
        month = "0" + month;
    }
    if (strDate <= 9) {
        strDate = "0" + strDate;
    }
    var myDate = date.getFullYear() + str1 + month + str1 + strDate
            + " " + date.getHours() + str2 + date.getMinutes()
            + str2 + date.getSeconds();
	$("#myDate").html("系统时间："+myDate);
}
function fireFunFormainFrameIndex(){
	try{
		$("#系统首页")[0].contentWindow.bkbj();
	}catch(e){}
}
function modifyPasswd(){
	$('#saveOrUpdateDevForm').form('clear');
	$('#SaveOrUpdateDevWin').window('open');
}
function updateDev(){
	var mm1 = $.trim($("#mm").val());
	var mm2 = $.trim($("#mm2").val());
	
	if(mm1 == "" || mm2 == ""){
		alert("密码不能为空");
		return ;
	}
	if(mm1 != mm2){
		alert("两次输入密码不一致");
		return ;
	}
	$("#saveOrUpdateDevForm").submit();
}
function cancelUpdateDev(){
	$("#saveOrUpdateDevForm")[0].reset();
	$("#SaveOrUpdateDevWin").window("close");
}
</script>
</head>
<body class="easyui-layout" >
<jsp:include page="/WEB-INF/content/UpdatePasswd.jsp" />
	<!-- 头部开始 -->
	<div data-options="region:'north',border:false" style="background:#114890;POSITION:relative; Z-INDEX: 1;">
	
		<div class="dashujutop">
		      <div class="dashujutopone">
		   		    <p class="uresxx"><span class="uresxxlimian1">${user.rname }：${user.xm }</span><a href="###" class="uresxxlimian2" onclick="modifyPasswd()">修改密码</a></p>
	      			<%-- <p class="uresxx"><span class="uresxxlimian1">${user.rname }：${user.xm }</span><span class="uresxxlimian2"><i id="myDate">登陆时间：2015-03-05 12:05:38</i></span> </p> --%>
	            	<p class="xitongtc"><!-- <a href="###" class="xitongtclimian1">系统设置</a> --><a href="###" class="xitongtclimian2" onclick="zhuXiao()">退出</a> </p>
		      </div>
		      <div class="dashujutoptwo">
		          <div class="dashujutlogooptwo"><img src="${ctx }/images/dsjlogo.jpg" style="font-size:0;"/></div>
		          <div class="dashujutnav" style="z-index: 99999;position: relative;">
	 		          <ul class="multiUl">
	 		          	<c:forEach items="${menuList }" var="menu">
	 		          		<c:choose>
								<c:when test="${menu.mid==101}">
									<li><a href="#" class="tupiansh1" onclick="AddHomtTab()">系统首页</a></li>
								</c:when>
								<c:otherwise>
									<li>
									    <!-- 无子菜单 -->
										<c:if test="${ menu.getChild().size()==0}">
											<a href="#" class="${menu.icon}" onclick="openMenu('${menu.mname }','${menu.url}')">${menu.mname}</a>
									 	</c:if>
										<c:if test="${ menu.getChild().size()!=0}">
				 							<a href="#" class="${menu.icon}" onclick="">${menu.mname}</a>
				 		                    <blockquote>
				 			                   <dl class="ChildNavIn">
				 			                      <c:forEach items="${menu.getChild()}" var="Childs">
				 			                      	<c:if test="${ Childs.getChild().size()!=0}">
				 			                         	 <dd>
	 			 			                         		<a href="#" class="yousnajcaidswdf">${Childs.mname }</a>
							                               <div class="ChildNavInsanji1">
						                               	   	<c:forEach items="${Childs.getChild()}" var="Childss">
								                                 	<a href="#" url="${Childss.url}" onclick="openMenu('${Childss.mname }','${Childss.url}')">${Childss.mname }</a>
							                                 </c:forEach>
							                            	</div>
				                  						 </dd>
			                  						 </c:if>
			                  						 <c:if test="${ Childs.getChild().size()==0}">
			                  						 	<dd>
							                               		<a href="#" url="${Childs.url}" onclick="openMenu('${Childs.mname }','${Childs.url}')">${Childs.mname }</a>
				                  						 </dd>
			                  						 </c:if>
				 			                       </c:forEach>
				 			                    </dl>
				 		                     </blockquote>
		 		                     	</c:if>
			                 		</li>
								</c:otherwise>					
							</c:choose>
	 					</c:forEach>
	 				  </ul>
		                 
		              <script type="text/javascript">
		                  var mst;
		                  jQuery(".multiUl li").hover(function(){
		                	  $(this).addClass("daohangdingdianid");
		                  	var curItem = jQuery(this);
		                  	mst = setTimeout(function(){//延时触发
		                   	curItem.find("blockquote").fadeIn(10);
		                    	mst = null;
		                  	});
		                  }, function(){
		                	  $(this).removeClass("daohangdingdianid")
		                  	if(mst!=null)clearTimeout(mst);
		                  	jQuery(this).find("blockquote").fadeOut(10);
		                  });
		                  

							$(".ChildNavIn>dd").hover(
													function(){
	                       	  $(this).addClass("tttt");
														
			                      }, function(){
			                   	 $(this).removeClass("tttt");
			                     });
		                  $(function(){
		                	  //addTab("首页","${ctx}/arcgis_map.jsp?timesampe="+new Date().getTime());
		                	  addTab("系统首页","${ctx}/login/home.htm?timesampe="+new Date().getTime());
		                  });
		                  //增加首页选项卡
		                  function AddHomtTab(){
		                	  addTab("系统首页","${ctx}/login/home.htm?timesampe="+new Date().getTime());
		                  }
		                  function openMenu(title,src){
		                	 // addTab(title,"${ctx}"+src+"?timesampe="+new Date().getTime());
		                	  if(title=="视频监控"){ 
		                		  var fulls = "left=0,screenX=0,top=0,screenY=0,scrollbars=1";    //定义弹出窗口的参数  
			      				  if (window.screen) {  
			      				     var ah = screen.availHeight - 30;  
			      				     var aw = screen.availWidth - 10;  
			      				     fulls += ",height=" + ah;  
			      				     fulls += ",innerHeight=" + ah;  
			      				     fulls += ",width=" + aw;  
			      				     fulls += ",innerWidth=" + aw;  
			      				     fulls += ",resizable"  
			      				 } else {  
			      				     fulls += ",resizable"; // 对于不支持screen属性的浏览器，可以手工进行最大化。 manually  
			      				 }  
		                		  window.open("${ctx}/"+src,'视频监控中心',fulls);
		                	  }else if(title=="录像查询"){ 
		                		  var fulls = "left=0,screenX=0,top=0,screenY=0,scrollbars=1";    //定义弹出窗口的参数  
			      				  if (window.screen) {  
			      				     var ah = screen.availHeight - 30;  
			      				     var aw = screen.availWidth - 10;  
			      				     fulls += ",height=" + ah;  
			      				     fulls += ",innerHeight=" + ah;  
			      				     fulls += ",width=" + aw;  
			      				     fulls += ",innerWidth=" + aw;  
			      				     fulls += ",resizable"  
			      				 } else {  
			      				     fulls += ",resizable"; // 对于不支持screen属性的浏览器，可以手工进行最大化。 manually  
			      				 }  
		                		  window.open("${ctx}/"+src,'录像查询',fulls);
		                	  }else{ 
		                		  addTab(title,"${ctx}"+src+"?timesampe="+new Date().getTime());
		                	  }
		                  }
		              </script>
		          </div>
		      </div>
		</div>
	</div>
	<!-- 头部结束 -->
	<div data-options="region:'center',border:false">
		<div id="tabs" class="easyui-tabs"  data-options="fit:true,border:false">
			<div id="" title="系统首页"></div>
		</div>
	</div>
	<div data-options="region:'south',border:false">
		<!--系统底部区域strat-->
			<div class="dashujufooter">
						<p class="footer_p1">版权所有&nbsp;&nbsp;安徽省公安厅交通警察总队&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;技术支持：安徽虹湾信息技术有限公司</p>
			     <!--  <p class="footer_p2">电子警察管理系统&nbsp;&nbsp;</p> -->
			</div>
		<!--系统底部区域end-->
	</div>
</body>
</html>